HEXO:给博文增加分类

增加分类属性

步骤参考这篇文章 → Hexo使用攻略-添加分类及标签

问题1:在增加分类的时候部署失败

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
yina:blog Yina$ hexo d
INFO Deploying: git
INFO Clearing .deploy_git folder...
INFO Copying files from public folder...
INFO Copying files from extend dirs...
On branch master
nothing to commit, working tree clean
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
FATAL Something's wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html
Error: ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

at ChildProcess.<anonymous> (/Users/Yina/blog/node_modules/hexo-util/lib/spawn.js:37:17)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)

问题:
fatal: Could not read from remote repository.

原因:
access rights
Please make sure you have the correct access rights
and the repository exists.

Error: ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

找到一个链接:https://github.com/hexojs/hexo/issues/2767
提供的解决方案:

测试:
可以实现部署。

问题2:分类博文在远程出现404错误

过了段时间重新试了下就OK了

问题3:分类没有入口

通过谷歌找到解决方法

要在主题的注册文件中修改。

before

1
2
3
4
5
menu:
home: / || home
#about: /about/ || user
#tags: /tags/ || tags
#categories: /categories/ || th

after

1
2
3
4
5
menu:
home: / || home
#about: /about/ || user
#tags: /tags/ || tags
categories: /categories/ || th